{% extends "base.html" %}
{% load i18n staticfiles %}
{% block title %}{% trans 'Chart' %}{% endblock %}
{% block breadcrumbs %}
    <i class="fa fa-home"></i> <a href="{% url 'index' %}">{% trans 'Home' %}</a>
    <i class="fa fa-angle-right"></i> <a href="{% url 'chart' %}">{% trans 'Chart' %}</a>
{% endblock %}
{% block content %}
    <div class="content-list">
        <div class="title"><h2>{% trans 'Chart' %}</h2></div>
        {% load staticfiles %}
        <div class="list grid">
            {% for package in package_list %}
                <div class="list-item chart-item">
                    <div class="icon">
                        <a href="{% url "package_id" package.id %}">
                            {% if package.display_icon %}
                                <img src="{{ package.display_icon }}"/>
                            {% else %}
                                <img src="{% static 'img/default-package-icon.png' %}"/>
                            {% endif %}
                        </a>
                    </div>
                    <div class="title-tag">
                        <div class="title">
                            <a href="{% url "package_id" package.id %}">{{ package.c_name | default:_("Untitled Package") }}</a>
                        </div>
                        <div class="tag">
                            {% if package.c_section %}
                                <a href="{% url "section_id" package.c_section.id %}">{{ package.c_section | default:_("No section") }}</a>
                            {% endif %}
                            <p>
                                {{ package.c_description | default:_("No description.") }}
                            </p>
                        </div>
                    </div>
                    {% if not settings.download_cydia_only %}
                        <div class="download">
                            <a rel="nofollow" href="{{ package.frontend_link }}" id="downloadlink"
                               target="_blank">{% trans "Download" %}
                                {% if settings.download_count %}<br/>
                                    {{ package.download_count }}
                                {% endif %}
                            </a>
                        </div>
                    {% endif %}
                </div>
            {% endfor %}
        </div>
        <div class="clear"></div>
    </div>
{% endblock %}